﻿@model HdipCricketClub.ViewModels.SelectedTeamCreatedViewModel

@{
    ViewBag.Title = "ConfirmEditedTeam";
}

<h2>Team has been successfully updated:</h2>

@using (@Html.BeginForm())
{
    <fieldset>
    <legend>Fixture:</legend>
    <br />
    @Html.DisplayFor(ModelItem => Model.SelectedFixture.Team.Club.ShortName) @Html.DisplayFor(ModelItem => Model.SelectedFixture.Team.name)
    vs @Html.DisplayFor(ModelItem => Model.SelectedFixture.Opponent.club_name) @Html.DisplayFor(ModelItem => Model.SelectedFixture.Opponent.team_name)<br />
    on @Html.DisplayFor(ModelItem => Model.SelectedFixture.date)
    @Html.HiddenFor(ModelItem => Model.SelectedFixture.fixture_id)
    <br />
    </fieldset>
    <br />
    <fieldset>
    <legend>Team Selected:</legend>
    <br />
        <table>
            <tr>
                <th>
                    Name:
                </th>
            </tr>
        @foreach (var item in Model.TeamCreated)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Member.FirstAndLastName)
                </td>
            </tr>
        }
    </table>
    </fieldset>
    <p>
        @Html.ActionLink("Contact Players", "ContactPlayers", new {id = Model.SelectedFixture.fixture_id })  |
        @Html.ActionLink("Edit Team", "EditTeam", new { id = Model.SelectedFixture.fixture_id})  |
        @Html.ActionLink("Return to Home Page", "Index", "Home")
    </p>
}